import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      name: 'index',
      path: '/',
      component: () => import('../pages/daydayup/251107.vue')
    },
    {
      name: 'daydayup',
      path: '/daydayup',
      component: () => import('../pages/daydayup/index.vue')
    }
  ]
})

router.beforeEach((to, from, next) => {
  console.log(to, from)
  //console.log(from.matched[0].instances.default.a);
  to.meta.from = from.matched[0]?.instances.default
  next()
})

router.afterEach((to, from) => {
  console.log(`afterEach`, to, from)
})

export default router
